<?php
/**
 * 图片上传测试
 */
namespace app\admins\controller\test;
use \think\Controller;
use \think\facade\Debug;
class Test extends \app\admins\controller\Auth {
    
    
    public function reg(){
        $reg = [
            'domain' => '/^(site|vip|s)[0-9]*$/'
        ];
        $str = 's11111';
        $result = preg_match($reg['domain'],$str );
        dump($result);
    }
    
    public function config(){
        $Config = new \logic\sys\config\Config();
        $info = $Config->getInfo('keep_domain');
        dump($info);
    }

    public function edit(){
        try{
            $site = [
                'name'          => '测试站点',
                'contactname'   => '联系人名称',
                'contacttel'    => '158888888888',
                'domaintype'    => '2',
                'domain'        => 'abcde',
                'addressdetail' => '地址。。。'                
            ];
            $SiteManage =  new \logic\site\SiteManage($this->getUser());
            $siteId = $SiteManage->adminEdit(8,$site);
            echo '修改成功';
            return '';
        }catch(\think\Exception $e){
            dump($e);
        }
        
        
    }
    
    
}